/*
 * An XML document type.
 * Localname: action
 * Namespace: urn:jbpm.org:jpdl-3.2
 * Java type: x2.orgJpdl3.jbpm.ActionDocument
 *
 * Automatically generated - do not modify.
 */
package x2.orgJpdl3.jbpm.impl;
/**
 * A document containing one action(@urn:jbpm.org:jpdl-3.2) element.
 *
 * This is a complex type.
 */
public class ActionDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.ActionDocument
{
    private static final long serialVersionUID = 1L;
    
    public ActionDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ACTION$0 = 
        new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "action");
    
    
    /**
     * Gets the "action" element
     */
    public x2.orgJpdl3.jbpm.ActionDocument.Action getAction()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
            target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().find_element_user(ACTION$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "action" element
     */
    public void setAction(x2.orgJpdl3.jbpm.ActionDocument.Action action)
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
            target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().find_element_user(ACTION$0, 0);
            if (target == null)
            {
                target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().add_element_user(ACTION$0);
            }
            target.set(action);
        }
    }
    
    /**
     * Appends and returns a new empty "action" element
     */
    public x2.orgJpdl3.jbpm.ActionDocument.Action addNewAction()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
            target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().add_element_user(ACTION$0);
            return target;
        }
    }
    /**
     * An XML action(@urn:jbpm.org:jpdl-3.2).
     *
     * This is a complex type.
     */
    public static class ActionImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.ActionDocument.Action
    {
        private static final long serialVersionUID = 1L;
        
        public ActionImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CLASS1$0 = 
            new javax.xml.namespace.QName("", "class");
        private static final javax.xml.namespace.QName CONFIGTYPE$2 = 
            new javax.xml.namespace.QName("", "config-type");
        private static final javax.xml.namespace.QName NAME$4 = 
            new javax.xml.namespace.QName("", "name");
        private static final javax.xml.namespace.QName REFNAME$6 = 
            new javax.xml.namespace.QName("", "ref-name");
        private static final javax.xml.namespace.QName ACCEPTPROPAGATEDEVENTS$8 = 
            new javax.xml.namespace.QName("", "accept-propagated-events");
        private static final javax.xml.namespace.QName EXPRESSION$10 = 
            new javax.xml.namespace.QName("", "expression");
        private static final javax.xml.namespace.QName ASYNC$12 = 
            new javax.xml.namespace.QName("", "async");
        
        
        /**
         * Gets the "class" attribute
         */
        public java.lang.String getClass1()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "class" attribute
         */
        public org.apache.xmlbeans.XmlString xgetClass1()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$0);
                return target;
            }
        }
        
        /**
         * True if has "class" attribute
         */
        public boolean isSetClass1()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(CLASS1$0) != null;
            }
        }
        
        /**
         * Sets the "class" attribute
         */
        public void setClass1(java.lang.String class1)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASS1$0);
                }
                target.setStringValue(class1);
            }
        }
        
        /**
         * Sets (as xml) the "class" attribute
         */
        public void xsetClass1(org.apache.xmlbeans.XmlString class1)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CLASS1$0);
                }
                target.set(class1);
            }
        }
        
        /**
         * Unsets the "class" attribute
         */
        public void unsetClass1()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(CLASS1$0);
            }
        }
        
        /**
         * Gets the "config-type" attribute
         */
        public java.lang.String getConfigType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONFIGTYPE$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CONFIGTYPE$2);
                }
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "config-type" attribute
         */
        public org.apache.xmlbeans.XmlString xgetConfigType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CONFIGTYPE$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_default_attribute_value(CONFIGTYPE$2);
                }
                return target;
            }
        }
        
        /**
         * True if has "config-type" attribute
         */
        public boolean isSetConfigType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(CONFIGTYPE$2) != null;
            }
        }
        
        /**
         * Sets the "config-type" attribute
         */
        public void setConfigType(java.lang.String configType)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONFIGTYPE$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CONFIGTYPE$2);
                }
                target.setStringValue(configType);
            }
        }
        
        /**
         * Sets (as xml) the "config-type" attribute
         */
        public void xsetConfigType(org.apache.xmlbeans.XmlString configType)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CONFIGTYPE$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CONFIGTYPE$2);
                }
                target.set(configType);
            }
        }
        
        /**
         * Unsets the "config-type" attribute
         */
        public void unsetConfigType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(CONFIGTYPE$2);
            }
        }
        
        /**
         * Gets the "name" attribute
         */
        public java.lang.String getName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "name" attribute
         */
        public org.apache.xmlbeans.XmlString xgetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
                return target;
            }
        }
        
        /**
         * True if has "name" attribute
         */
        public boolean isSetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(NAME$4) != null;
            }
        }
        
        /**
         * Sets the "name" attribute
         */
        public void setName(java.lang.String name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);
                }
                target.setStringValue(name);
            }
        }
        
        /**
         * Sets (as xml) the "name" attribute
         */
        public void xsetName(org.apache.xmlbeans.XmlString name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$4);
                }
                target.set(name);
            }
        }
        
        /**
         * Unsets the "name" attribute
         */
        public void unsetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(NAME$4);
            }
        }
        
        /**
         * Gets the "ref-name" attribute
         */
        public java.lang.String getRefName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REFNAME$6);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "ref-name" attribute
         */
        public org.apache.xmlbeans.XmlString xgetRefName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(REFNAME$6);
                return target;
            }
        }
        
        /**
         * True if has "ref-name" attribute
         */
        public boolean isSetRefName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(REFNAME$6) != null;
            }
        }
        
        /**
         * Sets the "ref-name" attribute
         */
        public void setRefName(java.lang.String refName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REFNAME$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(REFNAME$6);
                }
                target.setStringValue(refName);
            }
        }
        
        /**
         * Sets (as xml) the "ref-name" attribute
         */
        public void xsetRefName(org.apache.xmlbeans.XmlString refName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(REFNAME$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(REFNAME$6);
                }
                target.set(refName);
            }
        }
        
        /**
         * Unsets the "ref-name" attribute
         */
        public void unsetRefName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(REFNAME$6);
            }
        }
        
        /**
         * Gets the "accept-propagated-events" attribute
         */
        public x2.orgJpdl3.jbpm.BooleanType.Enum getAcceptPropagatedEvents()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(ACCEPTPROPAGATEDEVENTS$8);
                }
                if (target == null)
                {
                    return null;
                }
                return (x2.orgJpdl3.jbpm.BooleanType.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "accept-propagated-events" attribute
         */
        public x2.orgJpdl3.jbpm.BooleanType xgetAcceptPropagatedEvents()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.BooleanType target = null;
                target = (x2.orgJpdl3.jbpm.BooleanType)get_store().find_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                if (target == null)
                {
                    target = (x2.orgJpdl3.jbpm.BooleanType)get_default_attribute_value(ACCEPTPROPAGATEDEVENTS$8);
                }
                return target;
            }
        }
        
        /**
         * True if has "accept-propagated-events" attribute
         */
        public boolean isSetAcceptPropagatedEvents()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ACCEPTPROPAGATEDEVENTS$8) != null;
            }
        }
        
        /**
         * Sets the "accept-propagated-events" attribute
         */
        public void setAcceptPropagatedEvents(x2.orgJpdl3.jbpm.BooleanType.Enum acceptPropagatedEvents)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                }
                target.setEnumValue(acceptPropagatedEvents);
            }
        }
        
        /**
         * Sets (as xml) the "accept-propagated-events" attribute
         */
        public void xsetAcceptPropagatedEvents(x2.orgJpdl3.jbpm.BooleanType acceptPropagatedEvents)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.BooleanType target = null;
                target = (x2.orgJpdl3.jbpm.BooleanType)get_store().find_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                if (target == null)
                {
                    target = (x2.orgJpdl3.jbpm.BooleanType)get_store().add_attribute_user(ACCEPTPROPAGATEDEVENTS$8);
                }
                target.set(acceptPropagatedEvents);
            }
        }
        
        /**
         * Unsets the "accept-propagated-events" attribute
         */
        public void unsetAcceptPropagatedEvents()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ACCEPTPROPAGATEDEVENTS$8);
            }
        }
        
        /**
         * Gets the "expression" attribute
         */
        public java.lang.String getExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXPRESSION$10);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "expression" attribute
         */
        public org.apache.xmlbeans.XmlString xgetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXPRESSION$10);
                return target;
            }
        }
        
        /**
         * True if has "expression" attribute
         */
        public boolean isSetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(EXPRESSION$10) != null;
            }
        }
        
        /**
         * Sets the "expression" attribute
         */
        public void setExpression(java.lang.String expression)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXPRESSION$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXPRESSION$10);
                }
                target.setStringValue(expression);
            }
        }
        
        /**
         * Sets (as xml) the "expression" attribute
         */
        public void xsetExpression(org.apache.xmlbeans.XmlString expression)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXPRESSION$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(EXPRESSION$10);
                }
                target.set(expression);
            }
        }
        
        /**
         * Unsets the "expression" attribute
         */
        public void unsetExpression()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(EXPRESSION$10);
            }
        }
        
        /**
         * Gets the "async" attribute
         */
        public java.lang.String getAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ASYNC$12);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "async" attribute
         */
        public org.apache.xmlbeans.XmlString xgetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ASYNC$12);
                return target;
            }
        }
        
        /**
         * True if has "async" attribute
         */
        public boolean isSetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ASYNC$12) != null;
            }
        }
        
        /**
         * Sets the "async" attribute
         */
        public void setAsync(java.lang.String async)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ASYNC$12);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ASYNC$12);
                }
                target.setStringValue(async);
            }
        }
        
        /**
         * Sets (as xml) the "async" attribute
         */
        public void xsetAsync(org.apache.xmlbeans.XmlString async)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ASYNC$12);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ASYNC$12);
                }
                target.set(async);
            }
        }
        
        /**
         * Unsets the "async" attribute
         */
        public void unsetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ASYNC$12);
            }
        }
    }
}
